package vn.fsoft.gst.dao;

import java.util.List;

import vn.fsoft.gst.domain.Department;

/**
 * 
 * @author Tung
 *
 */

public interface DepartmentDAO {
	
	/**
	 * Add record into table department in database
	 * @param object object of Department type need add
	 * @return ID of row in table in database
	 */
    public Integer addDepartment(Department object);
    
    /**
     * get all list department in database
     * @return all data department
     */
    public List<Department> getListDepartment();
    
    /**
     * edit data of department with name
     * @param departmentName name department need edit
     * @return number row effect
     */
    public int editDepartment(Department object);
    
    /**
     * get information where department id
     * @param departmentName
     * @return
     */
    public Department getDepartmentById(int id);
    
    /**
     * mark active follow department id
     * @param departmentName 
     * @return number of rows effect
     */
    public int markActiveById(int id);
    
    /**
     * get all department object where directorateID
     * @param id ID of directorate
     * @return List<Department>
     */
    public List<Department> getListDepartmentByDirecId(int id);
    
    /**
     * mark inactive follow departmentid
     * @param id
     * @return 
     */
    public int markInActiveById(int id);
    
    /**
     * check unique department name in database
     * @param name departmentName
     * @return true or false
     */
    public boolean checkUniqueName(String name);
    
}
